//
// Decompiled by Jadx - 341ms
//
package r;

import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.view.View;

public final class e {
    public static int a(Context context, float f) {
        return (int) ((f * context.getResources().getDisplayMetrics().density) + 0.5f);
    }

    public static int b(char c) {
        return new int[]{Color.parseColor("#006699"), Color.parseColor("#336633"), Color.parseColor("#339999"), Color.parseColor("#663399"), Color.parseColor("#6699FF"), Color.parseColor("#993399"), Color.parseColor("#996633"), Color.parseColor("#6600FF"), Color.parseColor("#669900"), Color.parseColor("#999900"), Color.parseColor("#FF9900"), Color.parseColor("#99CC33")}[c % '\f'];
    }

    public static boolean c(Context context) {
        return (context.getResources().getConfiguration().uiMode & 48) == 32;
    }

    public static void d(int i, float f, View view) {
        e(view, view.getResources().getColor(i, null), f, f, f, f);
    }

    public static void e(View view, int i, float f, float f2, float f3, float f4) {
        GradientDrawable gradientDrawable = new GradientDrawable();
        gradientDrawable.setShape(0);
        gradientDrawable.setCornerRadii(new float[]{f, f, f2, f2, f4, f4, f3, f3});
        gradientDrawable.setColor(i);
        view.setBackground(gradientDrawable);
    }
}
